From e7f8df7db151e37abe2d4ed3938d095e381a2921 Mon Sep 17 00:00:00 2001
From: Drew Reece <drudus@gmail.com>
Date: Sun, 29 May 2011 05:16:03 +0100
Subject: [PATCH 1/2] Issue-1170234: Fixed form_state - pass it as reference.

---
 dbtng_example/dbtng_example.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dbtng_example/dbtng_example.module b/dbtng_example/dbtng_example.module
index 352d2d6..78c21cd 100644
--- a/dbtng_example/dbtng_example.module
+++ b/dbtng_example/dbtng_example.module
@@ -554,7 +554,7 @@ function dbtng_example_form_update_callback($form, $form_state) {
 /**
  * Submit handler for 'update entry' form.
  */
-function dbtng_example_form_update_submit($form, $form_state) {
+function dbtng_example_form_update_submit($form, &$form_state) {
   global $user;
 
   // Save the submitted entry.
-- 
1.7.4.4


From 34aba65e62bb769cd2792b4d7e73d940282fba39 Mon Sep 17 00:00:00 2001
From: Drew Reece <drudus@gmail.com>
Date: Sun, 29 May 2011 05:19:11 +0100
Subject: [PATCH 2/2] Issue-1170234: Replace additional form_state arguments -
 pass it as reference.

---
 dbtng_example/dbtng_example.module |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dbtng_example/dbtng_example.module b/dbtng_example/dbtng_example.module
index 78c21cd..a8590cd 100644
--- a/dbtng_example/dbtng_example.module
+++ b/dbtng_example/dbtng_example.module
@@ -454,7 +454,7 @@ function dbtng_example_form_add($form, &$form_state) {
 /**
  * Submit handler for 'add entry' form.
  */
-function dbtng_example_form_add_submit($form, $form_state) {
+function dbtng_example_form_add_submit($form, &$form_state) {
   global $user;
 
   // Save the submitted entry.
@@ -540,7 +540,7 @@ function dbtng_example_form_update($form, &$form_state) {
  *
  * When the pid changes, populates the defaults from the database in the form.
  */
-function dbtng_example_form_update_callback($form, $form_state) {
+function dbtng_example_form_update_callback($form, &$form_state) {
   $entry = $form_state['entries'][$form_state['values']['pid']];
   // Setting the #value of items is the only way I was able to figure out
   // to get replaced defaults on these items. #default_value will not do it
-- 
1.7.4.4

